function ret=comput_range(gnat,lst)
 global mplist=lst;
 ret=computRange(gnat);	
endfunction 

function ret=computRange(gnat)
 
 if(gnat.size<=getMinSize())
  return;
 endif
 
 global mplist;
 gnat.max_range={};
 gnat.min_range={};
 for i=1:length(gnat.spliting_points)
  gnat.max_range{i}=[];
  gnat.min_range{i}=[];
  d=gnat.spliting_points(i);
  for j=1:length(gnat.subGnats)
   [max,min]=gnat_distance(gnat.subGnats{j},mplist{d});
   gnat.max_range{i}(j)=max;
   gnat.min_range{i}(j)=min;
  endfor
 endfor
 
 for j=1:length(gnat.subGnats)
  gnat.subGnats{j}=computRange(gnat.subGnats{j});
 endfor
 
 ret=gnat;
endfunction

function ret=getMinSize()
 ret=600;
endfunction
